package pacote.doandroid;

public enum ErrorsEnum {

	_404("Status 404", "Page not found"),
	_403("403 Forbidden", "The server is refusing to respond");
	   
	
	private String error;
	private String msg;

	ErrorsEnum(String error, String msg) {
		this.error = error;
		this.msg = msg;
	}

	public String getMsg() {
		return msg;
	}
	
	public String getError() {
		return error;
	}


	public void setError(String error) {
		this.error = error;
	}


	public static String contains(String error){
		for (ErrorsEnum e : values()) {
			if (error.contains(e.getError())) {
				return e.getMsg();
			}
		}
		return null;
	}
	
	
}
